﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Entity
{
    [Table("AA01")]
   public class EntityUser:EntityBase
    {
        /// <summary> 
        /// 姓名---姓
        /// </summary>
        [Required]
        [StringLength(50)]
        [Column("AA001")]
        public string? FirstName { get; set; }
        /// <summary>
        /// 姓名---名
        /// </summary>
        [Required]
        [StringLength(150)]
        [Column("AA002")]
        public string? LastName { get; set; }

        /// <summary>
        /// 年龄
        ///</summary>
        ///[Required]
        [StringLength(50)]
        public string? Name { get => this.FirstName + this.LastName; }
        [Required]
        [Column("AA003")]
        public int Age { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        [Required]
        [Column("AA004")]
        public bool Gender { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        [Required]
        [StringLength(20)]
        [Column("AA005")]
        public string? PhoneNumber { get; set; }
        /// <summary>
        /// 电子邮件
        /// </summary>
        /// [Required]
        [StringLength(150)]
        [Column("AA001")]
        public string? Email { get; set; }
    }
}
